<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <title>编辑修改项目</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__LAYUI__/css/layui.css" media="all">
    <link rel="stylesheet" href="__ADMIN__/style/admin.css" media="all">
    <style>
        *{font-weight: 300;}

        main {padding: 15px;background-color: #ffffff;}
        main > blockquote {vertical-align: middle;overflow: hidden;color: #666;line-height: 60px;}
        main > blockquote > div > .layui-icon {font-size: 60px;color: #666;line-height: 60px;}

        .layui-form-pane .layui-form-text{padding: 0 10px;}
        .layui-form-pane .layui-form-label{background: none !important;padding-left: 2px;border: 0;color:#000;}
        .layui-form-pane .layui-form-text input, .layui-form-pane .layui-form-text textarea{border-radius: 3px !important;}
    </style>

</head>
<body>

<main>

    <blockquote class="layui-elem-quote layui-quote-nm">
        <div style="float: left;"><i class="layui-icon layui-icon-username"></i></div>
	    <div style="float: left;line-height: 30px;padding: 3px 3px 3px 10px;">
		    用户名：{$user.username}
		    <a class="logout" style="color: red;font-size: 80%;margin-left: 10px;" href="javascript:;">安全退出</a>
		    <br>
		    到期日期：{:date('Y-m-d', $user.end_time)}
	    </div>
    </blockquote>

	<div class="layui-btn-container" style="margin: 10px 0;">
		<a href="{:url('user/index/index')}" class="layui-btn layui-btn-primary layui-border-blue"><i class="layui-icon layui-icon-left"></i>返回首页</a>
		<a href="{:url('user/index/shareinfo')}" class="layui-btn layui-bg-blue"><i class="layui-icon layui-icon-share"></i>设置</a>
		{if $user.admin == 3}
		<a href="{:url('user/user/index')}" class="layui-btn layui-bg-blue"><i class="layui-icon layui-icon-user"></i>用户</a>
		{/if}
	</div>

    <blockquote class="layui-elem-quote layui-quote-nm">
        <p>标题中可以加入{city} 代表所在城市，{emoji} 代表随机表情</p>
    </blockquote>

    <form class="layui-form layui-form-pane" method="post" style="margin-top: 10px;">

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">群标题</label>
            <div class="layui-input-block">
                <input type="text" name="title" value="{$data.title}" placeholder="群标题" required lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>

	    <div class="layui-form-item layui-form-text">
		    <label class="layui-form-label">分享标题</label>
		    <div class="layui-input-block">
			    <input type="text" name="share_title" value="{$data.share_title}" placeholder="分享标题" required lay-verify="required" autocomplete="off" class="layui-input">
		    </div>
	    </div>

	    <div class="layui-form-item layui-form-text">
		    <label class="layui-form-label">分享描述</label>
		    <div class="layui-input-block">
			    <input type="text" name="share_desc" value="{$data.share_desc}" placeholder="分享描述" required lay-verify="required" autocomplete="off" class="layui-input">
		    </div>
	    </div>

	    <div class="layui-form-item layui-form-text upload">
		    <label class="layui-form-label">分享图标</label>
		    <div class="layui-input-block">
			    <input type="text" name="share_img" value="{$data.share_img}" required lay-verify="required" placeholder="上传图标" autocomplete="off" class="layui-input upload-input">
			    <div style="position: absolute;right: 0px;top: 0px;">
				    <img class="upload-img" src="{$data.share_img}" style="max-height: 36px;" onclick="showImg(this.src);"><button type="button" class="layui-btn layui-btn-primary upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
			    </div>
		    </div>
	    </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">群头像</label>
            <div class="layui-input-block">
	            <input type="radio" name="touxiang" lay-filter="touxiang" value="{$data.img}" title="<img src='{$data.img}' style='width:50px;'>当前" checked>
	            <input type="radio" name="touxiang" lay-filter="touxiang" value="__STATIC__/img/touxiang01.jpg" title="<img src='__STATIC__/img/touxiang01.jpg' style='width:50px;'>全女">
	            <input type="radio" name="touxiang" lay-filter="touxiang" value="__STATIC__/img/touxiang02.jpg" title="<img src='__STATIC__/img/touxiang02.jpg' style='width:50px;'>全男">
	            <input type="radio" name="touxiang" lay-filter="touxiang" value="__STATIC__/img/touxiang03.jpg" title="<img src='__STATIC__/img/touxiang03.jpg' style='width:50px;'>混搭">
	            <input type="radio" name="touxiang" lay-filter="touxiang" value="0" title="上传">
            </div>
        </div>

        <div class="layui-form-item layui-form-text upload" id="shangchuantouxiang" style="display: none;">
            <label class="layui-form-label" style="color: red;">上传头像</label>
            <div class="layui-input-block">
                <input type="text" name="img" value="{$data.img}" required lay-verify="required" placeholder="上传头像" autocomplete="off" class="layui-input upload-input">
                <div style="position: absolute;right: 0px;top: 0px;">
                    <img class="upload-img" src="{$data.img}" style="max-height: 36px;" onclick="showImg(this.src);"><button type="button" class="layui-btn layui-btn-primary upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                </div>
            </div>
        </div>

	    <div class="layui-form-item layui-form-text">
		    <label class="layui-form-label">聊天窗口</label>
		    <div class="layui-input-block">
			    <select name="ltck" lay-verify="required">
				    <option value="1" {$data.ltck == 1 ? 'selected' : ''}>✓ 有聊天窗口</option>
				    <option value="2" {$data.ltck == 2 ? 'selected' : ''}>✓ 无聊天窗口</option>
			    </select>
		    </div>
	    </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">聊天窗口模板</label>
            <div class="layui-input-block">
                <select name="muban" lay-filter="muban" lay-verify="required">
                    <option value="1" {$data.muban == 1 ? 'selected' : ''}>✓ 默认模板</option>
                    <option value="0" {$data.muban == 0 ? 'selected' : ''}>✓ 自定义模板</option>
                </select>
            </div>

            <div class="layui-input-block" id="zidingyi" {$data.muban != "0" ? ' style="display: none;"' : ''}>

            <table class="layui-table" lay-even lay-skin="line" style="border-color: #5FB878;border-collapse: inherit;border-radius: 3px;min-width: 700px;">
                <thead>
                <tr>
                    <th style="width: 80px;">头像(必填)</th>
                    <th style="width: 80px;">昵称</th>
                    <th style="width: 100px;">类型</th>
                    <th>内容（必填）</th>
                </tr>
                </thead>

                <style>
                    .up-btn{max-width: 60px;height: 50px;border: 1px solid #dddddd;text-align: center;border-radius: 3px;padding: 10px 5px;cursor: pointer;background-color: #fff;background-size:100%;background-repeat:no-repeat;text-shadow: 0px 0px 2px #ffffff;}
                </style>
                <tbody>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.0.ico) ? $data.zidingyi.0.ico : ''}); {:isset($data.zidingyi.0.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[0]" class="up-input" value="{:isset($data.zidingyi.0.ico) ? $data.zidingyi.0.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[0]" value="{:isset($data.zidingyi.0.name) ? $data.zidingyi.0.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[0]" value="img" title="图片" {:isset($data.zidingyi.0.type) && $data.zidingyi.0.type == 'img' || !isset($data.zidingyi.0.type) ? 'checked' : ''}>
                        <input type="radio" name="type[0]" value="word" title="文字" {:isset($data.zidingyi.0.type) && $data.zidingyi.0.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[0]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.0.url) ? $data.zidingyi.0.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.1.ico) ? $data.zidingyi.1.ico : ''}); {:isset($data.zidingyi.1.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[1]" class="up-input" value="{:isset($data.zidingyi.1.ico) ? $data.zidingyi.1.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[1]" value="{:isset($data.zidingyi.1.name) ? $data.zidingyi.1.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[1]" value="img" title="图片" {:isset($data.zidingyi.1.type) && $data.zidingyi.1.type == 'img' || !isset($data.zidingyi.1.type) ? 'checked' : ''}>
                        <input type="radio" name="type[1]" value="word" title="文字" {:isset($data.zidingyi.1.type) && $data.zidingyi.1.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[1]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.1.url) ? $data.zidingyi.1.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.2.ico) ? $data.zidingyi.2.ico : ''}); {:isset($data.zidingyi.2.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[2]" class="up-input" value="{:isset($data.zidingyi.2.ico) ? $data.zidingyi.2.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[2]" value="{:isset($data.zidingyi.2.name) ? $data.zidingyi.2.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[2]" value="img" title="图片" {:isset($data.zidingyi.2.type) && $data.zidingyi.2.type == 'img' || !isset($data.zidingyi.2.type) ? 'checked' : ''}>
                        <input type="radio" name="type[2]" value="word" title="文字" {:isset($data.zidingyi.2.type) && $data.zidingyi.2.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[2]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.2.url) ? $data.zidingyi.2.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.3.ico) ? $data.zidingyi.3.ico : ''}); {:isset($data.zidingyi.3.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[3]" class="up-input" value="{:isset($data.zidingyi.3.ico) ? $data.zidingyi.3.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[3]" value="{:isset($data.zidingyi.3.name) ? $data.zidingyi.3.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[3]" value="img" title="图片" {:isset($data.zidingyi.3.type) && $data.zidingyi.3.type == 'img' || !isset($data.zidingyi.3.type) ? 'checked' : ''}>
                        <input type="radio" name="type[3]" value="word" title="文字" {:isset($data.zidingyi.3.type) && $data.zidingyi.3.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[3]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.3.url) ? $data.zidingyi.3.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.4.ico) ? $data.zidingyi.4.ico : ''}); {:isset($data.zidingyi.4.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[4]" class="up-input" value="{:isset($data.zidingyi.4.ico) ? $data.zidingyi.4.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[4]" value="{:isset($data.zidingyi.4.name) ? $data.zidingyi.4.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[4]" value="img" title="图片" {:isset($data.zidingyi.4.type) && $data.zidingyi.4.type == 'img' || !isset($data.zidingyi.4.type) ? 'checked' : ''}>
                        <input type="radio" name="type[4]" value="word" title="文字" {:isset($data.zidingyi.4.type) && $data.zidingyi.4.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[4]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.4.url) ? $data.zidingyi.4.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.5.ico) ? $data.zidingyi.5.ico : ''}); {:isset($data.zidingyi.5.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[5]" class="up-input" value="{:isset($data.zidingyi.5.ico) ? $data.zidingyi.5.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[5]" value="{:isset($data.zidingyi.5.name) ? $data.zidingyi.5.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[5]" value="img" title="图片" {:isset($data.zidingyi.5.type) && $data.zidingyi.5.type == 'img' || !isset($data.zidingyi.5.type) ? 'checked' : ''}>
                        <input type="radio" name="type[5]" value="word" title="文字" {:isset($data.zidingyi.5.type) && $data.zidingyi.5.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[5]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.5.url) ? $data.zidingyi.5.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.6.ico) ? $data.zidingyi.6.ico : ''}); {:isset($data.zidingyi.6.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[6]" class="up-input" value="{:isset($data.zidingyi.6.ico) ? $data.zidingyi.6.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[6]" value="{:isset($data.zidingyi.6.name) ? $data.zidingyi.6.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[6]" value="img" title="图片" {:isset($data.zidingyi.6.type) && $data.zidingyi.6.type == 'img' || !isset($data.zidingyi.6.type) ? 'checked' : ''}>
                        <input type="radio" name="type[6]" value="word" title="文字" {:isset($data.zidingyi.6.type) && $data.zidingyi.6.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[6]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.6.url) ? $data.zidingyi.6.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.7.ico) ? $data.zidingyi.7.ico : ''}); {:isset($data.zidingyi.7.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[7]" class="up-input" value="{:isset($data.zidingyi.7.ico) ? $data.zidingyi.7.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[7]" value="{:isset($data.zidingyi.7.name) ? $data.zidingyi.7.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[7]" value="img" title="图片" {:isset($data.zidingyi.7.type) && $data.zidingyi.7.type == 'img' || !isset($data.zidingyi.7.type) ? 'checked' : ''}>
                        <input type="radio" name="type[7]" value="word" title="文字" {:isset($data.zidingyi.7.type) && $data.zidingyi.7.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[7]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.7.url) ? $data.zidingyi.7.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.8.ico) ? $data.zidingyi.8.ico : ''}); {:isset($data.zidingyi.8.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[8]" class="up-input" value="{:isset($data.zidingyi.8.ico) ? $data.zidingyi.8.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[8]" value="{:isset($data.zidingyi.8.name) ? $data.zidingyi.8.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[8]" value="img" title="图片" {:isset($data.zidingyi.8.type) && $data.zidingyi.8.type == 'img' || !isset($data.zidingyi.8.type) ? 'checked' : ''}>
                        <input type="radio" name="type[8]" value="word" title="文字" {:isset($data.zidingyi.8.type) && $data.zidingyi.8.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[8]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.8.url) ? $data.zidingyi.8.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.9.ico) ? $data.zidingyi.9.ico : ''}); {:isset($data.zidingyi.9.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[9]" class="up-input" value="{:isset($data.zidingyi.9.ico) ? $data.zidingyi.9.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[9]" value="{:isset($data.zidingyi.9.name) ? $data.zidingyi.9.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[9]" value="img" title="图片" {:isset($data.zidingyi.9.type) && $data.zidingyi.9.type == 'img' || !isset($data.zidingyi.9.type) ? 'checked' : ''}>
                        <input type="radio" name="type[9]" value="word" title="文字" {:isset($data.zidingyi.9.type) && $data.zidingyi.9.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[9]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.9.url) ? $data.zidingyi.9.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.10.ico) ? $data.zidingyi.10.ico : ''}); {:isset($data.zidingyi.10.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[10]" class="up-input" value="{:isset($data.zidingyi.10.ico) ? $data.zidingyi.10.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[10]" value="{:isset($data.zidingyi.10.name) ? $data.zidingyi.10.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[10]" value="img" title="图片" {:isset($data.zidingyi.10.type) && $data.zidingyi.10.type == 'img' || !isset($data.zidingyi.10.type) ? 'checked' : ''}>
                        <input type="radio" name="type[10]" value="word" title="文字" {:isset($data.zidingyi.10.type) && $data.zidingyi.10.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[10]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.10.url) ? $data.zidingyi.10.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.11.ico) ? $data.zidingyi.11.ico : ''}); {:isset($data.zidingyi.11.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[11]" class="up-input" value="{:isset($data.zidingyi.11.ico) ? $data.zidingyi.11.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[11]" value="{:isset($data.zidingyi.11.name) ? $data.zidingyi.11.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[11]" value="img" title="图片" {:isset($data.zidingyi.11.type) && $data.zidingyi.11.type == 'img' || !isset($data.zidingyi.11.type) ? 'checked' : ''}>
                        <input type="radio" name="type[11]" value="word" title="文字" {:isset($data.zidingyi.11.type) && $data.zidingyi.11.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[11]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.11.url) ? $data.zidingyi.11.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.12.ico) ? $data.zidingyi.12.ico : ''}); {:isset($data.zidingyi.12.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[12]" class="up-input" value="{:isset($data.zidingyi.12.ico) ? $data.zidingyi.12.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[12]" value="{:isset($data.zidingyi.12.name) ? $data.zidingyi.12.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[12]" value="img" title="图片" {:isset($data.zidingyi.12.type) && $data.zidingyi.12.type == 'img' || !isset($data.zidingyi.12.type) ? 'checked' : ''}>
                        <input type="radio" name="type[12]" value="word" title="文字" {:isset($data.zidingyi.12.type) && $data.zidingyi.12.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[12]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.12.url) ? $data.zidingyi.12.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.13.ico) ? $data.zidingyi.13.ico : ''}); {:isset($data.zidingyi.13.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[13]" class="up-input" value="{:isset($data.zidingyi.13.ico) ? $data.zidingyi.13.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[13]" value="{:isset($data.zidingyi.13.name) ? $data.zidingyi.13.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[13]" value="img" title="图片" {:isset($data.zidingyi.13.type) && $data.zidingyi.13.type == 'img' || !isset($data.zidingyi.13.type) ? 'checked' : ''}>
                        <input type="radio" name="type[13]" value="word" title="文字" {:isset($data.zidingyi.13.type) && $data.zidingyi.13.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[13]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.13.url) ? $data.zidingyi.13.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.14.ico) ? $data.zidingyi.14.ico : ''}); {:isset($data.zidingyi.14.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[14]" class="up-input" value="{:isset($data.zidingyi.14.ico) ? $data.zidingyi.14.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[14]" value="{:isset($data.zidingyi.14.name) ? $data.zidingyi.14.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[14]" value="img" title="图片" {:isset($data.zidingyi.14.type) && $data.zidingyi.14.type == 'img' || !isset($data.zidingyi.14.type) ? 'checked' : ''}>
                        <input type="radio" name="type[14]" value="word" title="文字" {:isset($data.zidingyi.14.type) && $data.zidingyi.14.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[14]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.14.url) ? $data.zidingyi.14.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div type="button" class="up-btn" style="background-image: url({:isset($data.zidingyi.15.ico) ? $data.zidingyi.15.ico : ''}); {:isset($data.zidingyi.15.ico) ? 'color: red;' : ''}">
                            <input type="hidden" name="ico[15]" class="up-input" value="{:isset($data.zidingyi.15.ico) ? $data.zidingyi.15.ico : ''}">
                            <i class="layui-icon">&#xe67c;</i><p>上传头像</p>
                        </div>
                    </td>
                    <td>
                        <input type="text" name="name[15]" value="{:isset($data.zidingyi.15.name) ? $data.zidingyi.15.name : ''}" placeholder="昵称" class="layui-input">
                    </td>
                    <td>
                        <input type="radio" name="type[15]" value="img" title="图片" {:isset($data.zidingyi.15.type) && $data.zidingyi.15.type == 'img' || !isset($data.zidingyi.15.type) ? 'checked' : ''}>
                        <input type="radio" name="type[15]" value="word" title="文字" {:isset($data.zidingyi.15.type) && $data.zidingyi.15.type == 'word' ? 'checked' : ''}>
                    </td>
                    <td>
                        <div class="upload" style="position: relative;">
                            <textarea name="url[15]" style="min-height: 76px;" placeholder="上传图片 或 输入文字"  onmouseenter="if (this.value){layer.tips('<p align=center>图片预览</p><img style=\'max-width: 100%;\' src='+this.value+'>', this, {tips: [3, '#5FB878']});}" class="layui-textarea upload-input">{:isset($data.zidingyi.15.url) ? $data.zidingyi.15.url : ''}</textarea>
                            <button style="position: absolute;right: 0;bottom: 0px;" type="button" class="layui-btn layui-btn-primary layui-btn-xs upload-button"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                        </div>
                    </td>
                </tr>

                </tbody>
            </table>

            </div>
        </div>

	    <div class="layui-form-item layui-form-text">
		    <label class="layui-form-label">返回广告链接</label>
		    <div class="layui-input-block">
			    <input type="text" name="back_jump_url" value="{$data.back_jump_url}" placeholder="http:// 或者 https://开头" required lay-verify="required" autocomplete="off" class="layui-input">
		    </div>
	    </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">分享结束后</label>
            <div class="layui-input-block">
                <input type="radio" name="share_end_type" lay-filter="share_end_type" value="1" title="跳转到指定链接" {$data.share_end_type == 1 ? 'checked' : ''}>
                <input type="radio" name="share_end_type" lay-filter="share_end_type" value="2" title="弹出二维码"    {$data.share_end_type == 2 ? 'checked' : ''}>
            </div>
        </div>

        <div class="layui-form-item layui-form-text share_end_type_1" {$data.share_end_type != 1 ? ' style="display: none;"' : ''}>
        <label class="layui-form-label">分享结束跳转链接</label>
        <div class="layui-input-block">
            <input type="text" name="share_end_url" value="{$data.share_end_url}" placeholder="http:// 或者 https://开头" autocomplete="off" class="layui-input">
        </div>
        </div>

	    <div class="layui-form-item layui-form-text upload share_end_type_2" {$data.share_end_type != 2 ? ' style="display: none;"' : ''}>
	    <label class="layui-form-label">分享结束弹出二维码（每行一个）</label>
	    <div class="layui-input-block">
		    <textarea name="qrcode" placeholder="每行一个二维码图片链接" class="layui-textarea upload-textarea">{$data.qrcode}</textarea>
		    <button type="button" class="layui-btn layui-btn-primary upload-button" style="position: absolute;right: 0px;bottom: 0px;"><i class="layui-icon layui-icon-upload"></i> 上传图片</button>
	    </div>
	    </div>

        <div class="layui-form-item">
            <div class="layui-input-block layui-btn-container" style="margin: 10px 0;text-align:center;">
                <button class="layui-btn" lay-submit lay-filter="edit"><i class="layui-icon layui-icon-ok"></i>立即保存</button>
	            <a href="{:url('user/index/index')}" class="layui-btn layui-btn-primary layui-border-blue"><i class="layui-icon layui-icon-left"></i>返回首页</a>
            </div>
        </div>
    </form>
</main>

<script src="__STATIC__/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__LAYUI__/layui.js" type="text/javascript"></script>
<script src="__STATIC__/js/public.js" type="text/javascript"></script>

<script>
    var editId = "{$data.id|default=0}";

    layui.use(['form'], function(){
        let form = layui.form;

        form.on('radio(share_end_type)', function (data) {
            if ( data.value == 1 ){
                $('.share_end_type_1').show();
                $('.share_end_type_2').hide();
            } else {
                $('.share_end_type_2').show();
                $('.share_end_type_1').hide();
            }
        });

        form.on('radio(touxiang)', function (data) {
            var touxiang = data.value;
            if ( touxiang == 0 ){
                $('#shangchuantouxiang').show();
            } else {
                $('#shangchuantouxiang').hide();
                $('#shangchuantouxiang .upload-input').val(touxiang);
                $('#shangchuantouxiang .upload-img').attr('src', touxiang);
                layer.msg('查看图片<br><img src="'+touxiang+'" width="100"><br>2秒后自动关闭', {time:2000});
            }
        });

	    form.on('select(muban)', function (data){
		    if ( data.value == 0 ){
			    $('#zidingyi').show();
		    }else{
			    $('#zidingyi').hide();
		    }
	    });

    });

</script>
</body>
</html>
